package operatori;
import arbori.*;

public abstract class Operator extends Nod{
	public abstract double calcul(double aux1, double aux2);
	public abstract String concatTermeni(String aux1, String aux2);
	
	public double calcul()
	{
		if(getfStang() == null || getfDrept() == null)
			System.exit(1);
		return this.calcul(getfStang().calcul(),getfDrept().calcul());
		
	}
	public String toString()
	{
		if(getfStang() == null || getfDrept() == null)
			System.exit(1);
		return this.concatTermeni(getfStang().toString(),getfDrept().toString());
		
	}
	
	

}
